package com.springboot.demo.design.pattern.form;

import com.springboot.common.entity.request.Parameter;
import com.springboot.db.entity.User;
import com.springboot.demo.design.pattern.enums.FormEnum;
import com.springboot.demo.design.pattern.request.user.UserSaveParam;
import org.springframework.stereotype.Component;

/**
 * loader工厂类
 *
 * @author supu
 * @date 2019-03-19 14:57
 **/
@Component
public class FormFactory {
    public StardardForm<User, UserSaveParam> saveUser(Parameter<UserSaveParam> parameter) {
        return new StardardForm<>(FormEnum.USER_SAVE, parameter);
    }
}
